package API;

public class demo01 {
    public static void main(String[] args) {
        String s1 = "abc";
        String s2 = "abc";
        System.out.println(s1.equals(s2));
        System.out.println(s1==s2);
        System.out.println(s1.length());


        String st = "Thanking in java";
        int index = st.indexOf("in");
        System.out.println(index);

        index = st.indexOf("in",6);
        System.out.println(index);

        System.out.println(st.lastIndexOf("in"));



        String bd = "www.baidu.com";
        String stb = bd.substring(4,9);
        System.out.println(stb);
        System.out.println(bd.substring(3));


    }
}
